Use the steps below to import OPC Data Client-UA for COM type libraries to Delphi XE7, Delphi XE8 or Delphi 10 Seattle.
Note, however, that for the purpose of our examples, we already ship Delphi (XE7) components created from importing OPC Data Client type libraries together with the examples. It may be faster and safer to simply reuse them. They are located in the “Imports” subdirectory under the Delphi examples directory (Examples-COM/OP/Imports relatively from the OPC Data Client installation folder).
In Delphi, select command Import Component” wizard appears, titled “Type of Component”:
. The first page of the “Select “Import a Type Library” and press the button.
The page “Registered Type Libraries” appears:
You may need to resize the form to make it larger, and/or drag the column header dividers to make the columns wider.
Type OPC into the search box, in order to narrow down the list of available type libraries. Select the type library you want to import, and press the button.
The page “Component” appears:
Check the “Generate Component Wrappers” box, and optionally modify the other settings as needed. Then, press the button.
The page “Create Unit” appears:
Select the option you need (typically, you can leave the “Create Unit” choice selected), and press the button.
If you need to import another type library, repeat the process from Step 1.
Note that importing a type library may also silently regenerate (and overwrite) an existing imported component that the type library depends on, but then without the “Generate Component Wrappers” option – potentially messing things up. To avoid this, you can either
or
or